from typing import Callable
from dataclasses import dataclass

@dataclass
class Card:
    name: str
    cost: int
    card_type: str  # attack, defense, skill
    description: str
    effect: Callable
    
    def use(self, player, target):
        """使用卡牌效果"""
        self.effect(player, target) 